extends "../pulimaosi-1/pulimaosi-1.gd"


func _extInit():
	._extInit()
	if isInManual():
		addSkill(sk1t1[1], sk1t1[0])
		addSkill(sk1t2[1], sk1t2[0])
	elif sk1 != 0:
		doChoiceSkill1()
	lv = 2             #等级的设置

var sk1t1 = ["绽盛威光·1", "每次对同一名敌人造成的炮击伤害会提高20%(上限300%)"]
var sk1t2 = ["绽盛威光·2", "本回合，对同一名敌人造成3次炮击伤害后，提高15点炮击"]

func doChoiceSkill1():
	var sk = get("sk1t%d"%sk1)
	addSkill(sk[1], sk[0])

var chaDic = {}
func _onAtkChara(atkInfo):
	._onAtkChara(atkInfo)
	if atkInfo.atkType == sys.AtkType.GUN:
		utils.dicPlus(chaDic, atkInfo.hitCha, 1)
		if sk1 == 2 and chaDic.get(atkInfo.hitCha) >= 3:
			chaDic[atkInfo.hitCha] = 0
			var bf = hasBuff("b_pilimaosi")
			if bf == null:
				bf = addBuff(b_pilimaosi.new())
			bf.att.atk += 15
		if sk1 == 1:
			atkInfo.factor += (chaDic.get(atkInfo.hitCha) - 1) * 0.2

class b_pilimaosi:
	extends "../../../../azurlane_ctrl/AzurBuff.gd"
	func _init():
		attInit()
		id = "b_pilimaosi"	
		dispel = 2